try {
this._clearUserVerifier();
this._userVerifier = client.open_reauthentication_channel_finish(result);
- } catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
- return;
- } catch(e if e.matches(Gio.DBusError, Gio.DBusError.ACCESS_DENIED) &&
- !this._reauthOnly) {
- // Gdm emits org.freedesktop.DBus.Error.AccessDenied when there is
- // no session to reauthenticate. Fall back to performing verification
- // from this login session
- client.get_user_verifier(this._cancellable, this._userVerifierGot.bind(this));
- return;
} catch(e) {
+ if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
+ return;
+ if (e.matches(Gio.DBusError, Gio.DBusError.ACCESS_DENIED) &&
+ !this._reauthOnly) {
+ // Gdm emits org.freedesktop.DBus.Error.AccessDenied when there
+ // is no session to reauthenticate. Fall back to performing
+ // verification from this login session
+ client.get_user_verifier(this._cancellable,
+ this._userVerifierGot.bind(this));
+ return;
+ }
+
this._reportInitError('Failed to open reauthentication channel', e);
return;
}
try {
this._clearUserVerifier();
this._userVerifier = client.get_user_verifier_finish(result);
- } catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
- return;
} catch(e) {
+ if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
+ return;
this._reportInitError('Failed to obtain user verifier', e);
return;
}
(obj, result) => {
try {
obj.call_begin_verification_for_user_finish(result);
- } catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
- return;
} catch(e) {
+ if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
+ return;
this._reportInitError('Failed to start verification for user', e);
return;
}
(obj, result) => {
try {
obj.call_begin_verification_finish(result);
- } catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED)) {
- return;
} catch(e) {
+ if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
+ return;
this._reportInitError('Failed to start verification', e);
return;
}
let source;
try {
source = this._ensureAppSource(appId);
- } catch(e if e instanceof InvalidAppError) {
- return;
+ } catch(e) {
+ if (e instanceof InvalidAppError)
+ return;
+ throw e;
}
notifications.forEach(([notificationId, notification]) => {
let source;
try {
source = this._ensureAppSource(appId);
- } catch(e if e instanceof InvalidAppError) {
- invocation.return_dbus_error('org.gtk.Notifications.InvalidApp', 'The app by ID "%s" could not be found'.format(appId));
- return;
+ } catch(e) {
+ if (e instanceof InvalidAppError) {
+ invocation.return_dbus_error('org.gtk.Notifications.InvalidApp', 'The app by ID "%s" could not be found'.format(appId));
+ return;
+ }
+ throw e;
}
let timestamp = GLib.DateTime.new_now_local().to_unix();
if (name.slice(0, text.length) == text)
results.push(name);
}
- } catch (e if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND) &&
- !e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_DIRECTORY))) {
- log(e);
+ } catch (e) {
+ if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND) &&
+ !e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_DIRECTORY))
+ log(e);
} finally {
return results;
}